unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, IniFiles;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    Button2: TButton;
    OpenDialog1: TOpenDialog;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
    MyIniFile: TIniFile;
begin
    MyIniFile := TIniFile.Create('myapp.ini');
    MyIniFile.WriteString('Transfer', 'Title1', 'Picture Painter');
    MyIniFile.Free;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
    MyIniFile: TIniFile;
begin
    MyIniFile := TIniFile.Create('myapp.ini');
//  MyIniFile.WriteString('Transfer', 'Title1', Memo1.Lines.Values['Title1']);
    showmessage( MyIniFile.ReadString('Transfer', 'Title1', '') );
    MyIniFile.Free;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
    OpenDialog1.Execute;
end;

end.
